<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Controller
 *
 * @author juwking
 */
require_once ('../Smarty-2.6.26/libs/Smarty.class.php');

abstract class ComponentBase {

    protected $smarty, $template;
    private $logger;
    function __construct() {
        $this->smarty = new Smarty();
        $this->smarty->template_dir = '../views';
        $this->smarty->compile_dir = '../tmp';
        $this->smarty->assign('page', &$this);

    }
    //public abstract function prepareSite();
    public function display($template) {
        $this->smarty->display($template);
    }

    /**
     * Przeciążyć aby zmienić template
     * @return String
     */
    /**
     * Wrapper metody Smarty
     * @param <type> $smartyHolder
     * @param <type> $content
     */
    public function assign($smartyHolder, $content) {
        $this->smarty->assign($smartyHolder, $content);
    }

}

?>
